package com.qf.hystrix02.fegin;

import com.qf.service.Book;
import org.springframework.stereotype.Component;

/**
 * @Auther: Song
 * @Date: 2022-03-19 17:26
 */
@Component
public class BookServiceFallback implements BookService {

    /**
     *  服务降级的方法
     * @param id
     * @return
     */
    @Override
    public Book getBookById(Integer id) {
        Book book = new Book();
        book.setId(id);
        book.setName("服务降级了");
        return book;
    }
}
